From: Roger Pau Monne Date: Mon, 9 Oct 2017 13:30:06 +0000 (+0100) Subject: libxl: set the default grant/maptrack frames at structure init X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~1199 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=ec3cf54fd2f32d3f8bff94931a7ac2c13cbc7c76;p=xen.git libxl: set the default grant/maptrack frames at structure init libxl_domain_build_info had both the maptrack and grant frames set to 0 by default, forcing the client of libxl to set a sane default. This is not backwards compatible, so instead initialize both max_grant_frames and max_maptrack_frames to a sane default (ie: like previous behavior). This fixes the libvirt tests in osstest. Signed-off-by: Roger Pau Monné Acked-by: Ian Jackson --- diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index e5ef920743..f82b91e0c1 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -322,6 +322,9 @@ */ #define LIBXL_HAVE_BUILDINFO_GRANT_LIMITS 1 +#define LIBXL_MAX_GRANT_FRAMES_DEFAULT 32 +#define LIBXL_MAX_MAPTRACK_FRAMES_DEFAULT 1024 + /* * LIBXL_HAVE_BUILDINFO_* indicates that libxl_domain_build_info has * the field represented by the '*'. The original position of those diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index ade359e387..2d0bb8a222 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -480,8 +480,8 @@ libxl_domain_build_info = Struct("domain_build_info",[ ("vnuma_nodes", Array(libxl_vnode_info, "num_vnuma_nodes")), - ("max_grant_frames", uint32), - ("max_maptrack_frames", uint32), + ("max_grant_frames", uint32, {'init_val': 'LIBXL_MAX_GRANT_FRAMES_DEFAULT'}), + ("max_maptrack_frames", uint32, {'init_val': 'LIBXL_MAX_MAPTRACK_FRAMES_DEFAULT'}), ("device_model_version", libxl_device_model_version), ("device_model_stubdomain", libxl_defbool),